package com.datou.salmon.api;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.datou.common.DatouResponseEntity;
import com.datou.common.DeviceApi;
import com.datou.salmon.entity.ActionRecord;
import com.datou.salmon.entity.IotLanStatus;
import com.datou.salmon.model.IotOperationRequest;

@FeignClient(name = "datou-salmon", path = "/salmon/")
public interface SalmonService {
	/**
	 * @param accept
	 *            RouterStatus
	 */
	@RequestMapping(method = RequestMethod.POST, value = "router/{routerId}/routerStatus")
	public DatouResponseEntity<IotLanStatus> acceptStatusReport(@PathVariable("routerId") String deviceId,
			@RequestBody IotLanStatus routerStatus);

	@RequestMapping(method = RequestMethod.POST, value = "device/{deviceId}/operation")
	public DatouResponseEntity<ActionRecord> acceptDeviceOperationDetail(@PathVariable("deviceId") String deviceId,
			@RequestBody ActionRecord actionRecord);


	@RequestMapping(method = RequestMethod.GET, value = "iotLan/api")
	public DatouResponseEntity<List<DeviceApi>> getDeviceApi(@RequestBody IotOperationRequest request);


}
